<?php
function cut_name($array,$condition){
	$myArray = explode($condition, $array);
	return $myArray;
}
$server = mysql_query("select * from phim where tenphim = '{$tenphim}' and linkanh is null");
$get_ten=cut_name($_GET['tentap'],"-");
$get_tentap=$get_ten[0];
$get_server=$get_ten[1];
$server_number=1;
while($d = mysql_fetch_array($server))
{
	$ten=cut_name($d['tentap'],"-");
	$tentap=$ten[0];
	$ten_s=$ten[1];
	if(strtoupper($tentap) == "XEM FULL") {echo "<h4 class ='server_name' >SERVER ".$server_number."</h4></br>";$server_number++;}
	if($get_tentap==$tentap and $get_server==$ten_s)
	{?>
 	<a class="go_episode go_episode_active" href="index.php?key=watch&id=<?php echo $_GET['id']?>&tentap=<?php echo $d['tentap']?>">
	<?php echo $tentap?>
    </a> 
<?php }	
	else {?>
    <a class="go_episode"  href="index.php?key=watch&id=<?php echo $_GET['id']?>&tentap=<?php echo $d['tentap']?>">
	<?php echo $tentap?>
    </a> 
<?php }
}
?>
   